package com.ruoyi.system.handle;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FillRuleControl {

    @Autowired
    List<IFillRuleHandler> handlers;

    public String getFillValue(String type, Map<String,Object> params,Map<String,Object> formData){
        for(IFillRuleHandler handler : handlers){
            if(handler.isSupport(type)){
                return handler.execute(params,formData);
            }
        }

        return null;
    }

}
